#!/sbin/openrc-run

name=jellyfin
description="The Free Software Media System"

command=/usr/bin/jellyfin
command_user=jellyfin:jellyfin
command_args="--webdir ${webdir:-/usr/share/webapps/jellyfin-web} --datadir ${datadir} --cachedir ${cachedir} --logdir ${logdir} --ffmpeg ${ffmpegpath:-/usr/lib/jellyfin-ffmpeg/ffmpeg} ${opts}"

depend() {
	use logger dns
	need net
	after firewall
}

start_pre() {
	checkpath -d -o $command_user "$datadir"
	checkpath -d -o $command_user "$cachedir"
	checkpath -d -o $command_user "$logdir"
}
